<template>
	<view class="page">
		<view class="tittle align">
			<view class="tittle_shu">
				
			</view>
			<view class="tittle_font">
				购物返利区
			</view>
		</view>
		<view class="card_item" v-for="(item,index) in jackpotData" @click="toIndex(item.id)">
			<image :src="item.jackpotUrl" mode="" style="width: 100%;height: 100%;"></image>
		</view>
	</view>
</template>

<script>
	import { jackpotList } from '@/tyapi/address.js'
	export default {
		data() {
		  return {
			  jackpotData:[],
		  }
		},
		onShow() {
		  this.getList()
		},
		methods: {
			toIndex(id){
				//在起始页面跳转到test.vue页面并传递参数
				uni.navigateTo({
					url: '/pages/prize/index?id='+id
				});

			},
			getList(){
				jackpotList().then(res => {
					console.log(res.data)
					this.jackpotData = res.data.data;
					
				})
			}
		}
	}
</script>

<style scoped>
	.page{
		padding: 10rpx;
	}
	.card_item{
		width: 100%;
		height: 340rpx;
		border-radius: 10rpx;
		overflow: hidden;
		margin-bottom: 10rpx;
	}
	.tittle{
		padding: 10rpx;
	}	
	.tittle_shu{
		background-color: #fa2209;
		width: 10rpx;
		height: 40rpx;
	}
	.tittle_font{
		font-size: 40rpx;
		margin-left: 10rpx;
		color: #000;
		font-weight: bolder;
	}
</style>